import request from '@/utils/request'
// 获取经纪列表
export function getBusiness(params) {
  return request({
    url: `/agents?_limit=${params._limit}&_start=${params._start}&name_contains=${params.name_contains}`
  })
}

// 添加经纪
export function addBusiness(data) {
  return request({
    url: '/agents',
    method: 'POST',
    data
  })
}
// 编辑经纪

export function editBusiness(id) {
  return request({
    url: `/agents/${id}`,
    method: 'GET'

  })
}
// 修改
export function correctBusiness(data) {
  return request({
    url: `/agents/${data.id}`,
    method: 'PUT',
    data
  })
}
// 删除
export function delBusiness(id) {
  return request({
    url: `/agents/${id}`,
    method: 'DELETE'
  })
}
// 获取经纪数量
export function getNumber() {
  return request({
    url: '/agents/count',
    method: 'get'
  })
}

